﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace Game_MVC3.Models
{
    public class News
    {
        [Key]
        [ScaffoldColumn(false)]
        public int ID { get; set; }

        [Column("author_username")]
        [Editable(false)]
        [Display(Name = "Author")]
        public string AuthorUsername { get; set; }

        [Required(ErrorMessage = "The field Title is required.")]
        [Display(Name = "Title", Description = "Title of the News")]
        public string Title { get; set; }

        [Editable(false)]
        public DateTime Date { get; set; }

        [Required(ErrorMessage = "the field Body is required.")]
        [Display(Name = "Body", Description = "Description of the News")]
        public string Text { get; set; }


        public virtual Admin Author { get; set; }
    }
}